CC=g++
CFLAGS=-c -Wall
LDFLAGS= -L /usr/local/lib -lboost_system -lboost_program_options -lboost_thread
EXEC=server.exe
SOURCES=main.cpp logging.cpp user.cpp db.cpp mainserver.cpp userconnectionmanager.cpp userconnection.cpp
OBJECTS=$(SOURCES:.cpp=.o)

all: $(SOURCES) $(EXEC)

$(EXEC): $(OBJECTS)
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@

.cpp.o:
	$(CC) $(CFLAGS) $< -o $@

clean: 
	\rm *.o  $(EXEC)
